﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace GameWP
{
    public static class ManagerGame
    {
        public static Luffy luffy;
        public static ManagerAHero managerAHero;
        public static ManagerZombie managerZombie;
        public static ManagerTrap managerTrap;
        public static Treasure treasure;
        public static Button goToShop;
        public static Camera camera;
        public static DBSound managerSound;
        public static DBSaveGame managerSaveLoad;        
        public static bool SoundOn = true;
        public static bool LevelNormal = true;
        public static Random rand = new Random();
        public static Aura AppearAura;

        
        // Parallax trong GetViewMatrix xua camera tuy thuoc vao Parallax cua bg
        public static Vector2 WorldToScreen(Vector2 worldPosition)
        {
            return Vector2.Transform(worldPosition, camera.GetViewMatrix(Vector2.One));
        }

        public static Vector2 ScreenToWorld(Vector2 screenPosition)
        {
            return Vector2.Transform(screenPosition, Matrix.Invert(camera.GetViewMatrix(Vector2.One)));
        } 
    }
}
